.. _Tutorial: using NeurEco GUI on a Parametric Frequency Sweep problem: Tutorial: using NeurEco GUI on a Parametric Frequency Sweep problem ====================================================================== This section uses the test case :std:ref:`FSS test case`. This test case can be selected directly from the template window of the GUI: .. figure:: /images/PFSGUIChoice.png :width: 450 :alt: PFSGUIChoice :align: center Choosing the test case FSS directly from the GUI examples Create an empty directory (FSS Example), extract the :std:ref:`FSS test case` test case data there. The GUI automatically extracts the data and creates the project in the chosen directory. The created directory contains the following files: .. figure:: /images/FSSGUIContent.png :width: 150 :alt: FSSGUIContent :align: center Content of the test case FSS from the GUI The FSSProjectData directory is the one used by the GUI alongside the NumPy data files. The rest is used by the other NeurEco interfaces. .. note:: To create the GUI project without using the template window, create a new directory called FSS and copy the data NumPy files into it. Go to the **File** menu, and click **New**, then choose the **Frequency Domain** solution and the **Parametric Frequency Sweep** template. Choose the name of the project and the name of the model as: FSS and fss1 and click ok. .. figure:: /images/FSSGUINormalChoice.png :width: 600 :alt: FSSGUINormalChoice :align: center Creating the project for the test case FSS from the GUI template The main window looks as follows at this stage: .. figure:: /images/FSSGUIMainLook.png :width: 800 :alt: FSSGUIMainLook :align: center Main window initial look after extracting the data: test case - FSS To build a model: * Provide the **Training data** * (optional) adjust the **Settings** (add some data for validation or test, change one or more building parameters (see :std:ref:`NeurEco Parametric Frequency Sweep build parameters GUI`). Here, for :std:ref:`FSS test case` test case, the **Settings** keep their default values. * Click the **Build** button in the GUI. During the build NeurEco saves the intermediate modes to the checkpoint file. In term of performance, every new model in the checkpoint is an improvement of the previous one. Note that at the end of the build, the last model in the checkpoint corresponds to the final mode. Any intermediate model can be used as if it was the final model: it can be evaluated on the new sets of data, exported, etc. Use the checkpoint slider to select a specific intermediate model. When an intermediate model is selected, the GUI updates the plot of reference vs prediction and the **Sensitivity analysis** plot (see :std:ref:`Sensitivity analysis Parametric Frequency Sweep`). .. figure:: /images/FSSGUIIntermediate.png :width: 800 :alt: FSSGUIIntermediate :align: center GUI operations: selecting an intermediate model: test case - FSS .. To perform a sensitivity analysis (see :std:ref:`Sensitivity analysis Parametric Frequency Sweep`) on any intermediate model: * Switch to the **Metrics** panel * Choose an intermediate model using the checkpoint slider * Choose a data set from **Evaluation files** (the testing data for this example) * Choose the initialization (see :std:ref:`Sensitivity analysis Parametric Frequency Sweep`) * Click on any output node in the **Network sensitivity** section (there is only one for :std:ref:`FSS test case` test case) * The plot displays the sensitivity analysis graph as in figure below: .. figure:: /images/FSSGUISensitivity.png :width: 200 :alt: FSSGUISensitivity :align: center GUI operations: Performing Sensitivity analysis: test case - FSS To perform an input sweep (see :std:ref:`Input sweep with the GUI PFS`): * Switch to the **Evaluation** panel. * Select an intermediate model using the checkpoint slider. By default, the last model is selected. * Switch to the **Input sweep** tab. * Select the data set in the **Evaluation files** section. * Select the sample's number in the data set. * Select the input to sweep and the output to visualize. * The plot displays the results, as in figure below: .. figure:: /images/FSSGUIInputSweep.png :width: 800 :alt: FSSGUIInputSweep :align: center GUI operations: Performing an input sweep: test case - FSS The **Evaluation** panel allows a user to load extra sets of data to evaluate the model on and to export the results in a csv or npy format (see :std:ref:`Evaluate NeurEco Parametric Frequency Sweep model with GUI`). The **Metrics** panel allows a user to calculate a set of metrics (see :std:ref:`Metrics Parametric Frequency Sweep`). For the **Parametric Frequency Sweep** problems these metrics looks as shown in the figure below: .. figure:: /images/FSSGUIMetrics.png :width: 800 :alt: FSSGUIMetrics :align: center GUI operations: Extracting the metrics: test case - FSS To export a **Parametric Frequency Sweep** model: * Switch to the **Export** panel * (optional) Select an intermediate model to export. By default, the final model is selected. * Choose the export format: NeurEco .ernn format or FMU (requires *neureco_embed_pfs* license) .. figure:: /images/FSSGUIExport.png :width: 350 :alt: FSSGUIExport :align: center GUI operations: Exporting a model : test case - FSS To create a Python script reproducing the main parts of the GUI project (see :std:ref:`Export Parametric Frequency Sweep from the GUI to the Python API`): * Go to **Python/Export NeurEco to Python** in the menu bar of the GUI * Choose which parts of the project to export to a Python script * Select the destination where to save the script .. figure:: /images/FSSGUIexportPython.png :width: 300 :alt: FSSGUIexportPython :align: center GUI operations: Exporting a Python script : test case - FSS .. warning:: To be able to use the script exported from the GUI, the NeurEco Python API package should be already installed on your computer.